package com.ls.springbootdemo.controller;

import com.ls.springbootdemo.config.SnakeFlowGenerator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 挥之以墨
 */
@RestController
@RequestMapping("snakeFlow")
public class SnakeFlowController {

    @Autowired
    private SnakeFlowGenerator snakeFlowGenerator;

    @GetMapping("getWorkId")
    public long getWorkId() {
        return snakeFlowGenerator.getId();
    }

}
